<?php
class My_View_Helper_Link extends Zend_View_Helper_Abstract
 {
       
        public function link($text,$modulo,$params=array(),$atributos=array(),$onlyurl=false)
        {


             foreach((array) $params as $k => $v){
                    $par[]="$k=$v";
             }

             
             if($par) $par='&'.implode('&',$par);
             else $par='';
             
             
            
        	 $url='/index.php?modulo='.$modulo.$par;
              
              if($onlyurl) return $url;
              
              foreach((array) $atributos as $k => $v){
                    $atr.=" $k = '$v' ";
              }

              $a='<a href="'.$url.'" '.$atr.'>'.$this->view->escape($text).'</a>';
              
              return $a;  
                
        }   
}